package com.shu;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
@MapperScan("com.shu.project.dao")
public class SeckillApplication extends SpringBootServletInitializer {
    /**
     * jar包启动
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(SeckillApplication.class, args);
    }

    /**
     * war包的方式启动
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SeckillApplication.class);
    }
}
